﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$id}</title>
	<include file="Public:header" />
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerButton.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerRadio.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script> 
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/jquery-validation/jquery.validate.min.js" type="text/javascript"></script> 
    <script src="__PUBLIC__/lib/jquery-validation/jquery.metadata.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/jquery-validation/messages_cn.js" type="text/javascript"></script>
    
    <script type="text/javascript">    
       $(function ()
        {
             $("#detailform").ligerForm();
             $("#nodeicon").ligerComboBox({
                onBeforeOpen: f_selectIcon, valueFieldID: 'nodeicon'
             });

        }); 
     
       function save()
       {
    	   $.post('__URL__/edit/',$("#detailform").serialize(),function(data){
	         //   LG.tip(data);
             var win = parent || window;
             win.LG.showMessage(data, function () { 
                     win.LG.closeAndReloadParent(null, "Node_index");
                   });
           });
       }
       function cancel()
       {
           var win = parent || window;
           win.LG.closeCurrentTab(null);
       }

        function f_selectIcon()
        {
            $.ligerDialog.open({ title: '选择图标', name:'winselector',width: 600, height: 500, url: '__URL__/selectIcon/', buttons: [
                { text: '确定', onclick: f_selectIconOK },
                { text: '取消', onclick: f_selectIconCancel }
            ]
            });
            return false;
        }

        function f_selectIconOK(item, dialog)
        {
			var fn = dialog.frame.f_select || dialog.frame.window.f_select; 
            var data = fn(); 
         /*   if (!data)
            {
                alert('请选择图标!');
                return;
            }*/
            $("#nodeicon").val(data);
            jiconlist = $("#image");
            if (!jiconlist.length) //jiconlist = $('<ul class="iconlist"></ul>').appendTo('body');
            $("#span_icon").html('<img id="image" src="" width="20" height="20"/>');
            $("#image").attr("src","__ROOT__"+data);
            dialog.close();
        }

        function f_selectIconCancel(item, dialog)
        {
            dialog.close();
        }

    </script> 
  <style type="text/css">
     body{ font-size:12px;}
    .l-lable {width:90px;text-align:left;}
    .l-input {width:182px;text-align:left;}
	.l-space {width:40px;}
           
        .l-table-edit {}
        .l-table-edit-td{ padding:4px;}
        .l-button-submit,.l-button-reset{width:80px; float:left; margin-left:10px; padding-bottom:2px;}
        .l-verify-tip{ left:230px; top:120px;}
    </style>

</head>
<body style="padding:10px">
<div class="title">编辑<eq name="vo.level"  value="1">应用</eq><eq name="vo.level" value="2">模块</eq><eq name="vo.level"  value="3">操作</eq></div>
<div></div>
<form name="detailform" id="detailform" class="l-form">
	<div class="l-group l-group-hasicon"><img src="__PUBLIC__/lib/ligerUI/skins/icons/communication.gif"><span>基础

信息</span></div>
	<ul>
		<li class="l-lable"><eq name="vo.level"  value="1">应用</eq><eq name="vo.level" value="2">模块</eq><eq name="vo.level"  value="3">操作</eq>名：</li>
		<li class="l-input">
				<input type="text" ltype="text" check='Require' warning="<eq name="vo.level" value="1">应用</eq><eq name="vo.level" value="2">模块</eq><eq name="vo.level" value="3">操作</eq>名称不能为空,且不能含有空格"  name="name" value="{$vo.name}">
		</li>
		<li class="l-space"></li>
	</ul>
	<ul>
		<li class="l-lable">显示名：</li>
		<li style="l-input">
			<input type="text" ltype="text" class="medium bLeftRequire" check='Require' warning="显示名称必须" name="title" value="{$vo.title}">
		</li>
		<li class="l-space"></li>
	</ul>
	<eq name="vo.level" value="2"> 
	<ul>
		<li class="l-lable">模块分组:</li>
		<li class="l-input">
				<SELECT ltype="select" name="group_id">
					<option value="">未分组</option>
					<volist name="list" id="group">
						<option value="{$group.id}" <eq name="group.id" value="$vo['group_id']">selected</eq>>{$group.title}</option>
					</volist>
				</SELECT>
		</li>
		<li class="l-space"></li>
	</ul>
	<else/>
		<input type="hidden" name="group_id">
	</eq>
	<ul>
		<li class="l-lable">状态：:</li>
		<li class="l-input">
				<SELECT ltype="select"  name="status">
					<option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
					<option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
				</SELECT>
		</li>
		<li class="l-space"></li>
	</ul>
		<ul>
		<li class="l-lable">界面显示：</li>
		<li class="l-input">
				<SELECT ltype="select"  name="is_show">
					<option <eq name="vo.is_show" value="1" >selected</eq> value="1">显示</option>
					<option <eq name="vo.is_show" value="0" >selected</eq> value="0">不显示</option>
				</SELECT>
		</li>
		<li class="l-space"></li>
	</ul>
	<ul>
		<li class="l-lable">图标：<span id="span_icon"><notempty name="vo.nodeicon"><img id="image" src="__ROOT__{$vo.nodeicon}"/></notempty></span></li>
		<li class="l-input">
			<input type="text" ltype="select" id="nodeicon" name="nodeicon" value="{$vo.nodeicon}">
				
		</li>
		<li class="l-space"></li>
	</ul>
	<ul>
		<li class="l-lable">备  注：</li>
		<li align="left" style="width:250px;text-align:left;">
			<TEXTAREA class="l-textarea"  name="remark" rows="5" cols="100" style="width:200px;margin-left: 0px;">{$vo.remark}</textarea>
		</li>
		<li class="l-space"></li>
	</ul>
	<ul>
		<input type="hidden" name="id" value="{$vo.id}" >
		<input type="hidden" name="ajax" value="1">
		<input type="hidden" name="pid" value="{$vo.pid}">
		<input type="button" value="保存" id="Button1" onclick="save()" class="l-button l-button-submit" /> 
		<input type="button" value="取消" id="Button1" onclick="cancel()" class="l-button l-button-submit" /> 
		<input type="reset" value="清空"  class="l-button l-button-reset"/>
	
	</ul>
</form>
<div style="display:none"></div>
</body>
</html>

